Virtual DOM Coverage: Drive an Effective Testing for Dynamic Web Applications
نویسندگان
چکیده
Test adequacy criteria are fundamental in software testing. Among them, code coverage criterion is widely used due to its simplicity and effectiveness. However, in dynamic web application testing, merely covering server-side script code is inadequate because it neglects client-side execution, which plays an important role in triggering client-server interactions to reach important execution states. Similarly, a criterion aiming at covering the UI elements on client-side pages ignores the server-side execution, leading to insufficiency. In this paper, we propose Virtual DOM (V-DOM) Coverage, a novel criterion, to drive web application testing. With static analysis, we first aggregate all the DOM objects that may be produced by a piece of server script to construct a V-DOM tree. The tree models execution on both the clientand server-sides such that V-DOM coverage is more effective than existing coverage criteria in web application testing. We conduct an empirical study on five real world dynamic web applications. We find that V-DOM tree can model much more DOM objects than a web crawling based technique. Test selection based on V-DOM tree criterion substantially outperforms the existing code coverage and UI element coverage, by detecting more faults.
منابع مشابه
Generating Fixtures for JavaScript Unit Testing
In today’s web applications, JavaScript code interacts with the Document Object Model (DOM) at runtime. This runtime interaction between JavaScript and the DOM is errorprone and challenging to test. In order to unit test a JavaScript function that has read/write DOM operations, a DOM instance has to be provided as a test fixture. This DOM fixture needs to be in the exact structure expected by t...
متن کاملA Hybrid Coverage Criterion for DynamicWeb Testing (S)
Testing criterion is a fundamental topic of software testing. A criterion is important to evaluate and drive a testing method. Code coverage is widely used in software testing, due to its simple implementation and effectiveness. Dynamic web techniques have been used to improve the usability and user experience of applications. However, it brings some new challenges for testing. Dynamic web appl...
متن کاملAutomated Regression Testing of Ajax Web Applications
There is a growing trend of moving desktop applications to the Web by using AJAX to create user-friendly and interactive interfaces. Well-known examples include GMail, Hotmail, Google Wave and office applications. One common way to provide assurance about the correctness of such complex and evolving systems is through regression testing. Regression testing classical web applications has already...
متن کاملA Sustainable Approach to Automate User Session Based State Machine Generation for Ajax Web Applications
A whole new generation WEB 2.0 is being written to take advantage of extreme dynamism as in AJAX. AJAX is used to build rich internet applications that are more interactive, responsive, and easy to use. With the advent of Ajax which involves extreme dynamism, novel problems add to those already known in the Web testing area. For Testing an AJAX application, a sustainable approach is required to...
متن کاملAutomatic Invariant Detection in Dynamic Web Applications
The complexity of modern web applications increases as client-side JavaScript and dynamic DOM programming are used to offer a more interactive web experience. In this paper, we focus on improving the dependability of such applications by automatically inferring invariants from the client-side and using those invariants for testing. By combining JavaScript code instrumentation and tracing we inf...
متن کامل